package API.Class.Math;

/**
 * 此类中的成员方法说明：
 * result用于返回因数，类型为String
 * 可以直接使用结果（不用result全局变量）
 */
public class GetFactor {
    public String result;

    public String run_Main(String Factor) {
        String result = "";
        long l = Long.parseLong(Factor);
        boolean r = false;
        int i1 = 0;
        for (int i = 1; i <= l; i++) {
            r = (l % i == 0);
            if (r) {
                i1++;
                result += i + "|";
            }
        }
        if (i1 == 0) {
            result += "|";
        }
        StringBuilder str1 = new StringBuilder(result);
        int len = str1.length() - 1;
        str1 = str1.deleteCharAt(len);
        result = str1.toString();
        return result;
    }

}
